package com.changgou.goods.dao;

import com.changgou.goods.pojo.Spec;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface SpecMapper extends Mapper<Spec> {

    //根据商品分类名称查询规格列表
    @Select("select name,`options` from tb_spec where template_id in (select template_id from tb_category where name ='手机') ")
    public List<Map> findSpecByGatetoryName(@PathVariable("categoryName")String categoryName);
}
